from django.urls import path
from rest_framework import routers
from api.views import account,topic,news,collect,recommend,comment

router = routers.SimpleRouter()
#用户注册
router.register(r'register', account.RegisterView,basename='register')
# 我的话题
router.register(r'topic', topic.TopicView,basename='topic')
#我的资讯
router.register(r'news',news.NewsView,basename='news')

# 资讯首页
router.register(r'index', news.IndexView)

# 收藏资讯
router.register(r'collect',collect.CollectView)

# 推荐资讯
router.register(r'recommend',recommend.RecommendView)

# 评论
router.register(r'comment',comment.CommentView)

urlpatterns = [
    path('auth/',account.AuthView.as_view())
]

urlpatterns += router.urls
